Skip to content

Part #3: segfault after compilation  #44

Description

@lis6502

Hi! thank you for really deep dive into NES internals :)
I wanted to play around with part 3's "cpu monitor" but i am unable to.

Looking around part 2's source i figured out possible g++ invocation
lis6502@e595:/var/tmp/auda/olcNES/Part #3 - Buses, Rams, Roms & Mappers$ g++ -o example Mapper.cpp Mapper_000.cpp Cartridge.cpp Bus.cpp olc2C02.cpp olc6502.cpp olcNes_Video2_2C02.cpp -lX11 -lGL -lpthread -lpng -lstdc++fs -std=c++17 -I ../../olcPixelGameEngine/
my g++ version
lis6502@e595:/var/tmp/auda/olcNES/Part #3 - Buses, Rams, Roms & Mappers$ g++ --version g++ (Debian 11.3.0-3) 11.3.0 Copyright (C) 2021 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

with -Wall it threws some undefined pragma warnings, but other than that produces executable file.

lis6502@e595:/var/tmp/auda/olcNES/Part #3 - Buses, Rams, Roms & Mappers$ ./example Segmentation fault

I am not much into cpp, especially when i realized that order of arguments like sources, executable name and include paths are significant.
What am i doing wrong here?

ps.1 olcPGE example complies just fine.
ps.2 at Cartridge.h you've missed #include <memory> ;p

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions