Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Part #3: segfault after compilation #44

Open
lis6502 opened this issue Jun 19, 2022 · 1 comment
Open

Part #3: segfault after compilation #44

lis6502 opened this issue Jun 19, 2022 · 1 comment

Comments

@lis6502
Copy link

lis6502 commented Jun 19, 2022

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

@brccabral
Copy link

Probably it is the same error described in #51

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants