qt - LNK2019: Portability from Windows to OSX -


i've been looking @ past couple of days no success. i've been trying create graphics application qt. seems lnk2019 should arise from unimplemented constructor:

main.obj:-1: error: lnk2019: unresolved external symbol "public: __cdecl            arbobject::arbobject(class table *,int *,int,int,int,int,int)" (?? 0arbobject@@qeaa@peavtable@@peahhhhhh@z) referenced in function "class std::vector<class arbobject *,class std::allocator<class arbobject *> > __cdecl  createarbobjects(class qlist<class qstringlist> &,class table *,int &)" (?createarbobjects@@ya?av?$vector@peavarbobject@@v?$allocator@peavarbobject@@@std@@@std@@aeav?    $qlist@vqstringlist@@@@peavtable@@aeah@z) 

however, constructor there , implemented in appropriate .cpp file.

.h file has this:  arbobject(table* tr, int* rgb, int t, int xpos, int ypos, int w, int h);  .cpp file has this: arbobject::arbobject(table* tr, int* rgb, int t, int xpos, int ypos, int w, int h)     : qwidget((qwidget*)tr), obj_typ(t), xpos(xpos), ypos(ypos),wid(w), hei(h) { ... } 

i've included can think of. doesn't work on windows machine, works on mac. question sorts of dependencies cause sort of issue? other avenues can explore solve problem?

  • is compiler based? msvc vs clang
  • do both include different files in linking process, hence may not work on 1 platform opposed another.

edit: fixed

see answer!

it turns out in fact way structured code determined compiler error. don't know why did it's due way structure code.

previously, included parser.h file relevant creation functions in main.cpp file. reasoning parser.h file included @ top of main.cpp file. parser.h place keep long functions out of sight.

now, create separate class parsing/creation, has methods create arbobjects, balls , etc. main function creates instance of parser , uses methods. makes compile no linker error


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -