#linking error

24 messages · Page 1 of 1 (latest)

tough skyBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.

#

@short salmon

Screenshots!

Your message appears to contain screenshots but no code. Please send code and error messages in text instead of screenshots if applicable!

short salmon
#

Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol "public: __cdecl SuperBox::SuperBox(void)" (??0SuperBox@@QEAA@XZ) referenced in function "public: __cdecl ofApp::ofApp(void)" (??0ofApp@@QEAA@XZ) C:\Users\zahra\OneDrive\Documents\Uni Work\YEAR 2\C++\of_v0.12.0_vs_release\apps\myApps\3dObject\3dObject.vcxproj C:\Users\zahra\OneDrive\Documents\Uni Work\YEAR 2\C++\of_v0.12.0_vs_release\apps\myApps\3dObject\main.obj 1

fading hazel
short salmon
#

But i am

#

I added the #include a the top of the files

fading hazel
#

#include is just a dump copy-paste of file contents

short salmon
#

wait so how do i link?

#

sorry i'm so new to c++

fading hazel
short salmon
#

oh

fading hazel
#

where is public: __cdecl SuperBox::SuperBox(void) defined?

short salmon
#

that's the header file

#

thats the cpp

fading hazel
#

show me your .cpp files in the solution explorer or whatever

#

are all your .cpp files in the sources folder

short salmon
#

they're all inside the src folder

#

this is the ofApp.h code

#

when i get rid of line 4 and 33 and the sbox.draw(); from the ofApp.cpp the code runs and builds the object

tough skyBOT
#

@short salmon

Please Do Not Delete Posts!

Please don't delete forum posts. They can be helpful to refer to later and other members can learn from them. In the future you can use !solved to close a post and mark a post as solved.