Click here to Skip to main content
15,887,027 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: linker cannot find shared library... Pin
jschell13-Dec-23 3:47
jschell13-Dec-23 3:47 
GeneralRe: linker cannot find shared library... Pin
Richard MacCutchan13-Dec-23 3:51
mveRichard MacCutchan13-Dec-23 3:51 
GeneralRe: linker cannot find shared library... Pin
Salvatore Terress13-Dec-23 12:24
Salvatore Terress13-Dec-23 12:24 
GeneralRe: linker cannot find shared library... Pin
Richard MacCutchan13-Dec-23 22:03
mveRichard MacCutchan13-Dec-23 22:03 
GeneralRe: linker cannot find shared library... Pin
jschell14-Dec-23 4:24
jschell14-Dec-23 4:24 
GeneralRe: linker cannot find shared library... Pin
Salvatore Terress15-Dec-23 11:47
Salvatore Terress15-Dec-23 11:47 
GeneralRe: linker cannot find shared library... Pin
Salvatore Terress16-Dec-23 10:03
Salvatore Terress16-Dec-23 10:03 
GeneralRe: linker cannot find shared library... Pin
k505416-Dec-23 12:13
mvek505416-Dec-23 12:13 
Clearly the QT IDE (QTCreator?) does a cd to some sort of project target directory before starting the build process, which may be different for a Debug build and a Release build. Like just about everybody else here, I don't do QT, and since your questions are more to do with QT and it's related tools than with C++ per se, you should probably ask your questions in a QT related forum.

It looks like, for some reason, you're using clang++ rather than g++ to compile. There's nothing wrong with that. It's just that the compiler argument -ccc-gcc-name g++ seems to suggest that you've somehow triggered cross compilation. Maybe. I really do not know. Googling for "clang -ccc-gcc-name" gets hits for cross-compiling. So you may have misconfigured your build environment. Or Not. You'd really have to ask someone who knows the QT IDE.

This fragment seems to be building a shared library, as evidenced by the the -sonme argument, the .so output file suffix, the output basename starting with lib, and the last 3 commands that create the .so links. But here is also a main.o being included in the target. Now there's nothing to say that a source file main.cpp must define main(), but I think most people would be expecting it. Assuming that you are trying to create a librarry, then f you do define main() in your main.cpp, then I would definitely consider that an error. That would mean that when you try to link that library into some other program, you'd end up with 2 main entry points, which I would expect the linker to flag as an error [weak symbols notwithstanding (google is your friend )]. Alternatively, maybe you are intending to produce an executable, and not a shared library. In which case, you've definitely made some mistakes configuring your target in the IDE.

So at the very least, I think you need to re-examine your IDE settings and see if you're actually doing what you think you're doing.
"A little song, a little dance, a little seltzer down your pants"
Chuckles the clown

GeneralRe: linker cannot find shared library... Pin
Salvatore Terress17-Dec-23 11:19
Salvatore Terress17-Dec-23 11:19 
GeneralRe: linker cannot find shared library... Pin
Richard MacCutchan16-Dec-23 21:16
mveRichard MacCutchan16-Dec-23 21:16 
Questionhow to add full path #include ? Pin
Salvatore Terress10-Dec-23 5:57
Salvatore Terress10-Dec-23 5:57 
AnswerRe: how to add full path #include ? Pin
Dave Kreskowiak10-Dec-23 6:19
mveDave Kreskowiak10-Dec-23 6:19 
GeneralRe: how to add full path #include ? Pin
Mircea Neacsu10-Dec-23 8:06
Mircea Neacsu10-Dec-23 8:06 
GeneralRe: how to add full path #include ? Pin
Dave Kreskowiak10-Dec-23 15:30
mveDave Kreskowiak10-Dec-23 15:30 
GeneralRe: how to add full path #include ? Pin
Peter_in_278010-Dec-23 16:25
professionalPeter_in_278010-Dec-23 16:25 
GeneralRe: how to add full path #include ? Pin
jschell11-Dec-23 4:33
jschell11-Dec-23 4:33 
GeneralRe: how to add full path #include ? Pin
Dave Kreskowiak11-Dec-23 4:41
mveDave Kreskowiak11-Dec-23 4:41 
GeneralRe: how to add full path #include ? Pin
k505411-Dec-23 6:12
mvek505411-Dec-23 6:12 
GeneralRe: how to add full path #include ? Pin
Dave Kreskowiak11-Dec-23 9:19
mveDave Kreskowiak11-Dec-23 9:19 
GeneralRe: how to add full path #include ? Pin
jschell12-Dec-23 5:13
jschell12-Dec-23 5:13 
GeneralRe: how to add full path #include ? Pin
Dave Kreskowiak12-Dec-23 5:25
mveDave Kreskowiak12-Dec-23 5:25 
GeneralRe: how to add full path #include ? Pin
k505412-Dec-23 5:31
mvek505412-Dec-23 5:31 
GeneralRe: how to add full path #include ? Pin
jschell12-Dec-23 11:10
jschell12-Dec-23 11:10 
GeneralRe: how to add full path #include ? Pin
Dave Kreskowiak12-Dec-23 11:19
mveDave Kreskowiak12-Dec-23 11:19 
GeneralRe: how to add full path #include ? Pin
k505412-Dec-23 5:30
mvek505412-Dec-23 5:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.