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

Building oF Projects with QBS: undefined reference to __imp_* #7248

Open
aidan-nixon opened this issue Dec 13, 2022 · 4 comments
Open

Building oF Projects with QBS: undefined reference to __imp_* #7248

aidan-nixon opened this issue Dec 13, 2022 · 4 comments

Comments

@aidan-nixon
Copy link

I'm using the latest master branch of oF. I am attempting to use QBS with MINGW64 to build an empty project - the code was generated by projectGenerator. I had an issue a little while ago when trying to make a project with ofOpenALSoundPlayer, which was fixed by using one of the nightly builds. However, a more complex issue has now presented itself, where the MINGW64 linker seems to place __imp_* infront of most function references. For example, the QBS output is littered with C:/openFrameworks/libs/openFrameworks/sound/ofOpenALSoundPlayer.cpp:39: undefined reference to __imp_alcProcessContext' , where the linker flags look like:
C:/msys64/mingw64/bin/g++.exe -Wl,-m,i386pep,-LC:/msys64/mingw64/lib,-LC:\msys64\/mingw32/lib -m64 -o C:/openFrameworks/apps/myApps/spaceRace/bin/spaceRace_debug c:/openFrameworks/apps/myApps/spaceRace/build/gcc_debug/debug/spaceRace.92ca53ff/f27fede2220bcd32/main.cpp.o c:/openFrameworks/apps/myApps/spaceRace/build/gcc_debug/debug/spaceRace.92ca53ff/f27fede2220bcd32/ofApp.cpp.o C:/openFrameworks/libs/openFrameworksCompiled/lib/msys2/libopenFrameworksDebug.a C:/openFrameworks/apps/myApps/spaceRace/../../../libs/kiss/lib/msys2/libkiss.a C:/openFrameworks/apps/myApps/spaceRace/../../../libs/tess2/lib/msys2/libtess2.a C:/openFrameworks/apps/myApps/spaceRace/../../../libs/videoInput/lib/msys2/libvideoinput.a -lcairo -lz -lglew32 -lglfw3 -lcurl -lssl -lcrypto -lrtaudio -lopengl32 -lgdi32 -lmsimg32 -lglu32 -lwinmm -lstrmiids -luuid -loleaut32 -lsetupapi -lwsock32 -lws2_32 -lIphlpapi -lComdlg32 -lfreeimage -lboost_filesystem-mt -lboost_system-mt -lfreetype -lpthread -lksuser -lole32 -ldsound.

As this is one of the first times I've tried to use oF, I am not too certain if anything is particularly concerning with this. Any pointers would be greatly appreciated :)

@aidan-nixon aidan-nixon changed the title Building oF Projects with QBS: 'undefined reference to __imp_* Building oF Projects with QBS: undefined reference to __imp_* Dec 13, 2022
@ofTheo
Copy link
Member

ofTheo commented Dec 15, 2022

@aidan-nixon if you build an example ( like one of the examples/sound/soundPlayerExample ) with make Release in a mingw64 shell does it build fine?

Just trying to determine if this is a QBS or make issue.

If it works with make you could also try VS Code - you would just need to configure it to use the mingw shell instead of the default shell.

https://forum.openframeworks.cc/t/trying-to-setup-vscode-it-wont-compile/40894/2

@ofTheo
Copy link
Member

ofTheo commented Dec 15, 2022

also tagging @oxillo

@aidan-nixon
Copy link
Author

Cheers @ofTheo! Make worked just fine, which is why it was a bit of a head scratcher. I've managed to build all the examples using make, so I'll continue using the Mingw64 shell inside of VS Code for the time being. I only really tried QBS to see if its build graphing would make builds any quicker on my old laptop.

Strangely enough, QBS gave the exact same errors on my PC as my laptop, both with fresh installs (nightly build of oF, latest version of QBS from choco). I'm sure I can figure it out, but I'm not 100% sure that QBS would even provide what I was looking for 😅

@dimitre
Copy link
Member

dimitre commented Nov 23, 2023

Hello @aidan-nixon in the latest nightlies you can use projectGenerator to build a VSCode (Codium) OF project

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

3 participants