|
ÂíÉÏ×¢²á£¬½á½»¸ü¶àºÃÓÑ£¬ÏíÓøü¶à¹¦ÄÜ^_^
ÄúÐèÒª µÇ¼ ²Å¿ÉÒÔÏÂÔØ»ò²é¿´£¬Ã»ÓÐÕ˺ţ¿Á¢¼´×¢²á
x
ͼƬΪ´úÂë
ÏÂÃæÊDZ¨´íÌáÐÑ
====================[ ¹¹½¨ | test | Debug ]=======================================
/Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake --build "/Volumes/My file/C/github/test/cmake-build-debug" --target test -j 6
[1/1] Linking C executable test
FAILED: test
: && /Library/Developer/CommandLineTools/usr/bin/cc -g -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.0.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/test.dir/hello.c.o CMakeFiles/test.dir/100.c.o -o test && :
duplicate symbol '_main' in:
/Volumes/My file/C/github/test/cmake-build-debug/CMakeFiles/test.dir/100.c.o
/Volumes/My file/C/github/test/cmake-build-debug/CMakeFiles/test.dir/hello.c.o
ld: 1 duplicate symbols
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
Õâ¸ö´íÎóÊÇÒòΪÁ½¸ö³ÌÐò¶¼¶¨ÒåÁËÒ»¸öÃûΪ¡°main¡±µÄº¯Êý£¬Õâ¸öº¯ÊýÊdzÌÐòµÄÈë¿Úµã£¬Òò´ËÔÚÁ´½Óʱ·¢ÉúÁ˳åÍ»¡£Òª½â¾öÕâ¸öÎÊÌ⣬ÄãÐèҪȷ±£Ã¿¸ö³ÌÐò¶¼ÓÐ×Ô¼ºµÄΨһµÄ¡°main¡±º¯Êý¡£Äã¿ÉÒÔ½«ÆäÖÐÒ»¸ö³ÌÐòÖеġ°main¡±º¯ÊýÖØÃüÃûΪÆäËûÃû³Æ£¬»òÕß½«Æä·ÅÔÚÒ»¸öµ¥¶ÀµÄÎļþÖУ¬²¢½«ÆäÓëÆäËûÎļþÁ´½Ó¡£
|
|