openframeworks / openframeworks/openFrameworks
Building oF Projects with QBS: undefined reference to `__imp_*`
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.4k
- Forks
- 2.6k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 9
Description
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 :)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the empty project build generated by projectGenerator using QBS and MINGW64, then inspect the linker command and the references reported from ofOpenALSoundPlayer.cpp. Pay particular attention to the mixed mingw64 and mingw32 library paths and the _imp* linker errors. Done means the generated project links successfully and the OpenAL references resolve.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100