468,458 Members | 1,826 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,458 developers. It's quick & easy.

error C1083

8
Dear All,

I have several problem about VC++. I succeed to convert Simulink MATLAB to C code using Real-Time Workshop. I am trying to compile a C code using Visual C++ and found the error. Can anyone explain how to solve it?

--------------------Configuration: PROJECT2 - Win32 Debug--------------------
Linking...
RV2AJFRONT_NEW.obj : error LNK2005: _rtM_RV2AJFRONT_NEW already defined in RV2AJFRONT_NEW.obj
RV2AJFRONT_NEW.obj : error LNK2005: _MdlStart already defined in RV2AJFRONT_NEW.obj
RV2AJFRONT_NEW.obj : error LNK2005: _MdlOutputs already defined in RV2AJFRONT_NEW.obj
RV2AJFRONT_NEW.obj : error LNK2005: _MdlUpdate already defined in RV2AJFRONT_NEW.obj
RV2AJFRONT_NEW.obj : error LNK2005: _MdlTerminate already defined in RV2AJFRONT_NEW.obj
RV2AJFRONT_NEW.obj : error LNK2005: _MdlInitializeSizes already defined in RV2AJFRONT_NEW.obj
RV2AJFRONT_NEW.obj : error LNK2005: _MdlInitializeSampleTimes already defined in RV2AJFRONT_NEW.obj
RV2AJFRONT_NEW.obj : error LNK2005: _RV2AJFRONT_NEW already defined in RV2AJFRONT_NEW.obj

Please help me and give me the reason how to repair this errors.

Thank You.
Jan 2 '08 #1
9 2696
dewi
8
Dear All,

Please help me how to solve it?

--------------------Configuration: PROJECT2 - Win32 Debug--------------------
Linking...
RV2AJFRONT_NEW.obj : warning LNK4006: _rtM_RV2AJFRONT_NEW already defined in RV2AJFRONT_NEW.obj; second definition ignored
RV2AJFRONT_NEW.obj : warning LNK4006: _MdlStart already defined in RV2AJFRONT_NEW.obj; second definition ignored
RV2AJFRONT_NEW.obj : warning LNK4006: _MdlOutputs already defined in RV2AJFRONT_NEW.obj; second definition ignored
RV2AJFRONT_NEW.obj : warning LNK4006: _MdlUpdate already defined in RV2AJFRONT_NEW.obj; second definition ignored
RV2AJFRONT_NEW.obj : warning LNK4006: _MdlTerminate already defined in RV2AJFRONT_NEW.obj; second definition ignored
RV2AJFRONT_NEW.obj : warning LNK4006: _MdlInitializeSizes already defined in RV2AJFRONT_NEW.obj; second definition ignored
RV2AJFRONT_NEW.obj : warning LNK4006: _MdlInitializeSampleTimes already defined in RV2AJFRONT_NEW.obj; second definition ignored
RV2AJFRONT_NEW.obj : warning LNK4006: _RV2AJFRONT_NEW already defined in RV2AJFRONT_NEW.obj; second definition ignored

Thank You
Jan 2 '08 #2
dewi
8
Hello,

Please give me reason how to solve this error?

RV2AJFRONT_NEW.obj : error LNK2001: unresolved external symbol _rtP
RV2AJFRONT_NEW.obj : error LNK2001: unresolved external symbol _rtP
RV2AJFRONT_NEW.obj : error LNK2001: unresolved external symbol _rtNaN
RV2AJFRONT_NEW.obj : error LNK2001: unresolved external symbol _rtNaN
Debug/PROJECT2.dll : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.

Thank You
Jan 2 '08 #3
Hi,
You should have included the lib files twice. Check in the properties.
Jan 2 '08 #4
Savage
1,764 Expert 1GB
It seems,that you have multiple variables declared with same name.If you are working with custom header files,make sure you only include them once.To do so you can use preprocessor directive pragma(not recommended,because it's not fully standardized) or you can wrap it inside this set of directives:

Expand|Select|Wrap|Line Numbers
  1. #ifndef __HEADERFILE__
  2. #define __HEADERFILE__
  3.  
  4. /*your code*/ 
  5.  
  6. #endif /*end of header file*/
  7.  
  8. /*or*/
  9. #pragma once /*pragma style*/
  10. /*yourcode*/
  11.  
  12.  


Savage
Jan 2 '08 #5
weaknessforcats
9,207 Expert Mod 8TB
Those symbols are used in the RV2AJFRONT_NEW source file but the symbols are not defined in that file.

You a) have omitted a source file in your build, or b) have omitted to include a the necessary library in your build.

All you have to do is find where the synbols are defined (not declared) and include that resource in your build.
Jan 2 '08 #6
dewi
8
Hello,

Sorry, i still have problem again with these error. Give me the solution for these error. Thank You

--------------------Configuration: PROJECT2 - Win32 Debug--------------------
Compiling...
RV2AJFRONT_NEW.c
c:\matlab6p5\work\rv2ajfront_new_grt_rtw\rv2ajfron t_new.c(11) : fatal error C1083: Cannot open include file: 'stdafx.h': No such file or directory
Error executing cl.exe.

PROJECT2.dll - 1 error(s), 0 warning(s)
Jan 3 '08 #7
dewi
8
Hi,
You should have included the lib files twice. Check in the properties.
Thank you for your help.
Jan 3 '08 #8
dewi
8
It seems,that you have multiple variables declared with same name.If you are working with custom header files,make sure you only include them once.To do so you can use preprocessor directive pragma(not recommended,because it's not fully standardized) or you can wrap it inside this set of directives:

Expand|Select|Wrap|Line Numbers
  1. #ifndef __HEADERFILE__
  2. #define __HEADERFILE__
  3.  
  4. /*your code*/ 
  5.  
  6. #endif /*end of header file*/
  7.  
  8. /*or*/
  9. #pragma once /*pragma style*/
  10. /*yourcode*/
  11.  
  12.  


Savage
Thank you for your help.
Jan 3 '08 #9
dewi
8
Those symbols are used in the RV2AJFRONT_NEW source file but the symbols are not defined in that file.

You a) have omitted a source file in your build, or b) have omitted to include a the necessary library in your build.

All you have to do is find where the synbols are defined (not declared) and include that resource in your build.
Thank you very much for your help
Jan 3 '08 #10

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Steve | last post: by
3 posts views Thread by Ann | last post: by
1 post views Thread by Jason | last post: by
2 posts views Thread by jsl | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by kmladenovski | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.