No argument specified with option "/MAPINFO" , why? - c++

I try to fix my previous company project on visual studio 2013, but when i try to build i have error like this
error LNK1146: no argument specified with option "/MAPINFO"
when i see on linker -> Command Line -> additional options, i see this command:
/MAPINFO:EXPORTS /MAPINFO /MAPINFO:LINES
if i delete that command, i get success build my project,
what i asking is :
why compiler say no argument specified on that option ?
what /MAPINFO using for ? (sorry i asking this cause i'm new on visual studio)
on my linker command line, is there any wrong command i write ?
if i delete this command does this effected on my project result ?
Thank you
PS: forgive my english

As far as I know, /MAPINFO:LINES is no longer supported since VS2005. You could delete it.
If you need to use it, you may have a try to find a replacement of it. You can refer to the link below and consider using dbghelp library to do this.

Related

D8016 '/clr' and '/MT' command-line options are incompatible

I have made an Windows Application using visual c++[CLR Empty Project].But when I run that .exe file in another PC i get error of ucrtbased.dll, VCRUNTIME140D and MSVCP140D file is missing.
For this, we have changed the Runtime Library from Multi-threaded Debug DLL(/MDd) to Multi-threaded(/MT). Then also i am getting error like :-
Error : D8016 '/clr' and '/MT' command-line options are incompatible.
So, if any one have any idea to resolve this problem will be appreciated.
Thanks in advance !!!

i don't know what is wrong with vs code in running cpp

i just started to code in cpp and nothing is working idk if i didn't install the gcc properly or what but i already set the path of the bin file idk why it refuses to run
the code:
#include<iostream>
int main()
{
std::cout<<"hello";
}
and the problem is that when I try to use the "code runner extension" it is not working so I just press f5 and then when I get the error messages which says at first "could not find the task file'c/c++:g++.exe build active file' " and I get three options 1:debug anyway
2:configure task
3:cancel
when I choose debug anyway I get this error here
Since you're on windows consider installing Visual Studio or CLion. They're more beginner friendly - VSCode can get tricky to run c++ on windows. Either way, looks like you're trying to run your project without building it first. There should be a build option right next to the run option. Try building it, then running. The build is what compiles and creates the project.exe file, which is what the compiler is saying isn't there.
The referenced IDE's always auto-build on run, so there's that
If you're familiar with using the command line, these commands will do what you want, assuming the .cpp file is in your current directory.
g++ <FILENAME>
./a.out
There are wonderful flags you can add to the first command (the compiling command) like -Wall, -Wextra, -o, and many more. But, since it seems like you're just starting out, there's no need to worry about those!
If you're not familiar with the command line, I would encourage you to become familiar! It is an extremely powerful tool for a programmer. Here is a YouTube video that talks about it.

CreateProcess error=206, Eclipse CDT with GCC compile ThreadX+GUIX

When I compile ThreadX+GUIX project of eclipse CDT with arm-none-eabi-gcc(Win7 64bit). It come out make (e=206). I found the same problems happened almost in JAVA development,but their solutions are not work for the CDT. Here is the compile error information:
I know the reason is because the GUIX has 1311 source files, and the compile and link operation command comes beyond the 8192 command limit. I have try to update the eclipse ,and move my workspace to the root of disk ,but the error still comes out. Now I don't know how to solve this problem. Anybody help me
If it is failing during linker/librarian stage, I modify the librarian command line to use an object_list.txt file to feed in the object file list, rather than specify them all on the command line. So something like this:
arm-elf-ar -r libguix.a #../object_list.txt
I use a python script to generate object_list.txt from the list of .c files, so it looks like this:
./common/src/gx_accordion_menu_create.o
./common/src/gx_accordion_menu_draw.o
./common/src/gx_accordion_menu_event_process.o
./common/src/gx_accordion_menu_position.o
./common/src/gx_animation_canvas_define.o
./common/src/gx_animation_complete.o
./common/src/gx_animation_create.o
./common/src/gx_animation_drag_disable.o
etc...
In your eclipse IDE there are settings to run your own custom linker command line rather than the default command line that isn't working.
Let me know if that helps you.

Codeblocks C 'Hello World' : Does not run, No such file or directory [duplicate]

I'm new to programming so I feel there is something simple I'm missing here.
I'm using the latest version of Mac and I've just installed Code::Blocks along with Xcode so I can use the gcc compiler.
I created a new "console application" project and the code for a hello world program shows up.
I built this code and it gave me 0 errors and 0 warnings so I thought it was off to a good start.
But when I go to run this code all I get is the following in my Terminal window:
*/Applications/CodeBlocks.app/Contents/MacOS/cb_console_runner DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:. /Users/Ryan/Documents/C++ book stuff/SayHello/bin/Debug/SayHello
Ryan-McMullens-iMac:~ Ryan$ /Applications/CodeBlocks.app/Contents/MacOS/cb_console_runner DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:. /Users/Ryan/Documents/C++ book stuff/SayHello/bin/Debug/SayHello
sh: /Users/Ryan/Documents/C++: No such file or directory
Process returned 127 (0x7F) execution time : 0.003 s
Press ENTER to continue.*
I've checked to make sure its using the gcc compiler. I've also tried creating a C++ directory in my documents folder but that didn't help.
Like I said, I feel like I'm just missing a step somewhere so any help would be really appreciated!
Thanks!
Try avoiding using '+' and spaces in the name of directories.
Many program don't handle escaping of pathnames when running external tools like compiler, linker or when calling the final executable.
Remove spaces from your path. It seems that codeblocks does not quote the paths, so every space will be introducing a new command or parameter. The problem here is this part:
C++ book
because it has a whitespace.

Code::Blocks isn't executing properly

I'm new to programming so I feel there is something simple I'm missing here.
I'm using the latest version of Mac and I've just installed Code::Blocks along with Xcode so I can use the gcc compiler.
I created a new "console application" project and the code for a hello world program shows up.
I built this code and it gave me 0 errors and 0 warnings so I thought it was off to a good start.
But when I go to run this code all I get is the following in my Terminal window:
*/Applications/CodeBlocks.app/Contents/MacOS/cb_console_runner DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:. /Users/Ryan/Documents/C++ book stuff/SayHello/bin/Debug/SayHello
Ryan-McMullens-iMac:~ Ryan$ /Applications/CodeBlocks.app/Contents/MacOS/cb_console_runner DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:. /Users/Ryan/Documents/C++ book stuff/SayHello/bin/Debug/SayHello
sh: /Users/Ryan/Documents/C++: No such file or directory
Process returned 127 (0x7F) execution time : 0.003 s
Press ENTER to continue.*
I've checked to make sure its using the gcc compiler. I've also tried creating a C++ directory in my documents folder but that didn't help.
Like I said, I feel like I'm just missing a step somewhere so any help would be really appreciated!
Thanks!
Try avoiding using '+' and spaces in the name of directories.
Many program don't handle escaping of pathnames when running external tools like compiler, linker or when calling the final executable.
Remove spaces from your path. It seems that codeblocks does not quote the paths, so every space will be introducing a new command or parameter. The problem here is this part:
C++ book
because it has a whitespace.