UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor gonen
Visitor
10,966 Views
Registered: ‎12-11-2013

FFT C model C simulation fails to compile.

Jump to solution

Hi,

I dowloaded the FFT C model v8 for WIN 7 64 bit:

"xfft_v8_0_bitacc_cmodel_nt64.zip"

 

I'm using Visual Studio 2008 to run the included test C code named:

"run_bitacc_cmodel.c"

 

Opened a "WIN32 console application" project and followed instructions at:

"xfft_bitacc_cmodel_ug459.pdf" also included at tha package.

 

I get numerous errors during build (F7):

c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(39) : error C2143: syntax error : missing '{' before ':'

Build log attached...

 

Can you please advice?

 

Best regards,

Gonen

 

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
Xilinx Employee
Xilinx Employee
15,354 Views
Registered: ‎08-01-2007

Re: FFT C model C simulation fails to compile.

Jump to solution

Try the chaning the Code Generation Runtime Library linking to Multi-threaded DLL (/MD).

This can be found under the Configuration Properties -> C/C++ -> Code Generation -> Runtime Library

 

Visual Studio C/C++ Properties

Chris
Video Design Hub | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
15 Replies
Xilinx Employee
Xilinx Employee
10,951 Views
Registered: ‎08-01-2007

Re: FFT C model C simulation fails to compile.

Jump to solution

Generate the C-Model from 2013.3 or later.
Select C++ as the language in Visual Studio.
See if you can compile the nt version using a 32-bit compiler.

If you need NT64, make sure you have access to a 64-bit compiler.

Chris
Video Design Hub | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
Visitor gonen
Visitor
10,943 Views
Registered: ‎12-11-2013

Re: FFT C model C simulation fails to compile.

Jump to solution

Thanks Chris.

 

(1) I use ISE, not VIVADO - how do I create the C model at ISE 14.5?

(2) C++ is the default but files soffix is 'c', not 'cpp'

      Renaming to 'cpp' seems to solve the error above but then I gen linker error stating  fft functions not found.

Can you please advise?

Thanks,

Gonen.

0 Kudos
Visitor gonen
Visitor
10,926 Views
Registered: ‎12-11-2013

Re: FFT C model C simulation fails to compile.

Jump to solution

Hi

I generated xfft_v8_0 fro ISE 14.5 64bit.

Renamed "run_bitacc_cmodel.c" to "run_bitacc_cmodel.cpp" and it compiled as C++.

the former error seems to be solved but now I get linker error:

1>------ Build started: Project: General0, Configuration: Debug Win32 ------
1>Linking...
1>run_bitacc_cmodel.obj : error LNK2019: unresolved external symbol _xilinx_ip_xfft_v8_0_destroy_state referenced in function _main
1>run_bitacc_cmodel.obj : error LNK2019: unresolved external symbol _xilinx_ip_xfft_v8_0_bitacc_simulate referenced in function _main
1>run_bitacc_cmodel.obj : error LNK2019: unresolved external symbol _xilinx_ip_xfft_v8_0_create_state referenced in function _main
1>C:\_work\DaniTest\Xilinx_FFT\FFTv8\General0\Debug\General0.exe : fatal error LNK1120: 3 unresolved externals
1>Build log was saved at "file://c:\_work\DaniTest\Xilinx_FFT\FFTv8\General0\Debug\BuildLog.htm"
1>General0 - 4 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

 could you pleas advise?

Build log and settings export attached.

Thanks,

gonen

0 Kudos
Xilinx Employee
Xilinx Employee
10,901 Views
Registered: ‎08-01-2007

Re: FFT C model C simulation fails to compile.

Jump to solution

Based on the error log it looks like you are trying to us a 32-bit compiler to comple the 64-bit binaries, and this will not work.  Try using the using the 32-bit binaries and see if that resolves your problem.


I've never seen any cases where the 64-bit version were needed, so I woudl expect the 32-bit version to be fine for your use case as well.  The main reason would be if you needed to access very large ammounts of data, but that is highly unlikely unless you are doing an extreemly large FFT, like in the millions of points.

Chris
Video Design Hub | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
Visitor gonen
Visitor
10,899 Views
Registered: ‎12-11-2013

Re: FFT C model C simulation fails to compile.

Jump to solution

Thanks a lot Chris,

 

To the best of my understanding my compiler is 32bit and I tried both "xfft_v8_0_bitacc_cmodel_nt64.zip" and "xfft_v8_0_bitacc_cmodel_nt.zip" binaries with similar results.

 

How do I verify that I'm using a 32 bit compiler?

Does it have anything to do with project/solution properties?

It is installed at "C:\Program Files (x86)\Microsoft Visual Studio 11.0"...

Standard VS2008 install.

 

I believe that somehow the lib/dll are not defined correctly for some reason.

I placed them all at the same directory with c/h files and followed instructions of the pdf.

 

Maybe this is related to the project type (console/general/win32 etc)?

 

This is really frustrating! It should have been so simple..,

 

Any advise will be more then welcomed...

 

Gonen.

0 Kudos
Visitor gonen
Visitor
10,897 Views
Registered: ‎12-11-2013

Re: FFT C model C simulation fails to compile.

Jump to solution
With the 32bit binaries, the linker also has an error:

MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
0 Kudos
Xilinx Employee
Xilinx Employee
10,895 Views
Registered: ‎08-01-2007

Re: FFT C model C simulation fails to compile.

Jump to solution

You will want to make sure to include both the .lib and .dll file into your MS Visual Studio project.  Sometimes these get overlooked.  They both are required in order to properly link.

 

If this isn't working You may want to try updating to the latest tools 2013.3, and using the C-Models generated with the FFT core.  The way the C-Models were being generated was updated and should make the compiling and linking easier.

Chris
Video Design Hub | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
Visitor gonen
Visitor
10,882 Views
Registered: ‎12-11-2013

Re: FFT C model C simulation fails to compile.

Jump to solution

Thanks a lot for you help Chris!

 

I managed to compile & run the Cmodel generated by ISE 14.5 using the 32bit binaries from "xfft_v8_0_bitacc_cmodel_nt".

 

The steps I took:

(1) rename "run_bitacc_cmodel.c" to "run_bitacc_cmodel.cpp"

(2) open new "win32 console application" project

(3) Add "run_bitacc_cmodel.cpp" to "source Files" at solution explorer

(4) make sure all lib, dll and h files are at the same dir as "run_bitacc_cmodel.cpp"

(5) at project properties-->linker->input--> Additional Dependencies: "libIp_xfft_v8_0_bitacc_cmodel.lib"

(6) build successful.

 

Still, at "debug" configuration I get a new error:

"Run-Time Error! R6034: An application has made an attempt to load the C runtime library incorrectly."

The logfile says:

"libIp_xfft_v8_0_bitacc_cmodel.dll', Binary was not built with debug information."

"The program '[16252] prj.exe: Native' has exited with code -1073741502 (0xc0000142)."

 

Using "Release" it is running OK but this is not good enough...

 

I've re-checked "project properties-->Manifest tool-->input and output-->Embad Manifest" is set to "yes"

 

Any idea what is the "debug" error cause?

 

Thanks again for your support,

Gonen.

 

logfile:

'prj.exe': Loaded 'D:\Dropbox\Dani\XilinxIP\FFTv8_2048\xfft_v8_2048\cmodel\xfft_v8_0_bitacc_cmodel_nt\Debug\prj.exe', Symbols loaded.
'prj.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll'
'prj.exe': Loaded 'C:\Program Files\AVAST Software\Avast\snxhk.dll'
'prj.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll'
'prj.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll'
'prj.exe': Loaded 'D:\Dropbox\Dani\XilinxIP\FFTv8_2048\xfft_v8_2048\cmodel\xfft_v8_0_bitacc_cmodel_nt\libIp_xfft_v8_0_bitacc_cmodel.dll', Binary was not built with debug information.
'prj.exe': Loaded 'D:\Dropbox\Dani\XilinxIP\FFTv8_2048\xfft_v8_2048\cmodel\xfft_v8_0_bitacc_cmodel_nt\stlport.5.1.dll'
'prj.exe': Loaded 'C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86\msvcp90.dll'
'prj.exe': Loaded 'C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86\msvcr90.dll'
'prj.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc90.debugcrt_1fc8b3b9a1e18e3b_9.0.21022.8_none_96748342450f6aa2\msvcp90d.dll', Symbols loaded.
'prj.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc90.debugcrt_1fc8b3b9a1e18e3b_9.0.21022.8_none_96748342450f6aa2\msvcr90d.dll', Symbols loaded.
'prj.exe': Loaded 'C:\Windows\SysWOW64\user32.dll'
'prj.exe': Loaded 'C:\Windows\SysWOW64\gdi32.dll'
'prj.exe': Loaded 'C:\Windows\SysWOW64\lpk.dll'
'prj.exe': Loaded 'C:\Windows\SysWOW64\usp10.dll'
'prj.exe': Loaded 'C:\Windows\SysWOW64\msvcrt.dll'
'prj.exe': Loaded 'C:\Windows\SysWOW64\advapi32.dll'
'prj.exe': Loaded 'C:\Windows\SysWOW64\sechost.dll'
'prj.exe': Loaded 'C:\Windows\SysWOW64\rpcrt4.dll'
'prj.exe': Loaded 'C:\Windows\SysWOW64\sspicli.dll'
'prj.exe': Loaded 'C:\Windows\SysWOW64\cryptbase.dll'
'prj.exe': Loaded 'C:\Windows\SysWOW64\imm32.dll'
'prj.exe': Loaded 'C:\Windows\SysWOW64\msctf.dll'
'prj.exe': Loaded 'C:\Windows\SysWOW64\nvinit.dll'
'prj.exe': Loaded 'C:\Windows\SysWOW64\uxtheme.dll'
'prj.exe': Loaded 'C:\Windows\SysWOW64\dwmapi.dll'
The program '[16252] prj.exe: Native' has exited with code -1073741502 (0xc0000142).

 

 

0 Kudos
Xilinx Employee
Xilinx Employee
15,355 Views
Registered: ‎08-01-2007

Re: FFT C model C simulation fails to compile.

Jump to solution

Try the chaning the Code Generation Runtime Library linking to Multi-threaded DLL (/MD).

This can be found under the Configuration Properties -> C/C++ -> Code Generation -> Runtime Library

 

Visual Studio C/C++ Properties

Chris
Video Design Hub | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
Visitor gonen
Visitor
7,503 Views
Registered: ‎12-11-2013

Re: FFT C model C simulation fails to compile.

Jump to solution

Thanks a lot!

If it is not asking too much, could you explain why this solution worked?

It looks like a "project-properties-voodoo" to me :-)

Gonen

 

0 Kudos
Xilinx Employee
Xilinx Employee
7,501 Views
Registered: ‎08-01-2007

Re: FFT C model C simulation fails to compile.

Jump to solution

There is probalby some sense in which that is true.  It actually took us a while to figure this out.

I think the reason is that the Xilinx C-Models are compiled with debug capabilities turned off.

Chris
Video Design Hub | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
Visitor gonen
Visitor
7,497 Views
Registered: ‎12-11-2013

Re: FFT C model C simulation fails to compile.

Jump to solution

I realy appriciate your effort & support!

 

Just one last thing (I hope) - with the latest VIVADO/ISE C-model, do I get a C++ file or still "run_bitacc_cmodel.c"?

Was renaming the soffix to cpp the right thing to do to solve my 1st error?

 

Thanks again,

Gonen.

0 Kudos
Xilinx Employee
Xilinx Employee
7,495 Views
Registered: ‎08-01-2007

Re: FFT C model C simulation fails to compile.

Jump to solution

You get the same.

You can do 2 things, one is rename to cpp, which Visual Studio treast as  C++ file, or you can use the properties to force the project to C++.

Chris
Video Design Hub | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
Visitor gonen
Visitor
7,491 Views
Registered: ‎12-11-2013

Re: FFT C model C simulation fails to compile.

Jump to solution

I see...

 

Thank you very much,

 

Gonen.

0 Kudos
Newbie jwik
Newbie
2,657 Views
Registered: ‎04-01-2016

Re: FFT C model C simulation fails to compile.

Jump to solution

I am also having trouble getting the c model to run. I have tried to follow the comments in this forum and am still running into issues. Any help would be appreciated.

 

I am getting the following output:

 

'ConsoleApplication_empty_cpp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcr120.dll'. Symbols loaded.
'ConsoleApplication_empty_cpp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\apphelp.dll'. Symbols loaded.
'ConsoleApplication_empty_cpp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\user32.dll'. Symbols loaded.
'ConsoleApplication_empty_cpp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\gdi32.dll'. Symbols loaded.
'ConsoleApplication_empty_cpp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\lpk.dll'. Symbols loaded.
'ConsoleApplication_empty_cpp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\usp10.dll'. Symbols loaded.
'ConsoleApplication_empty_cpp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcrt.dll'. Symbols loaded.
'ConsoleApplication_empty_cpp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\advapi32.dll'. Symbols loaded.
'ConsoleApplication_empty_cpp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sechost.dll'. Symbols loaded.
'ConsoleApplication_empty_cpp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\rpcrt4.dll'. Symbols loaded.
'ConsoleApplication_empty_cpp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sspicli.dll'. Symbols loaded.
'ConsoleApplication_empty_cpp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\cryptbase.dll'. Symbols loaded.
'ConsoleApplication_empty_cpp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\imm32.dll'. Symbols loaded.
'ConsoleApplication_empty_cpp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msctf.dll'. Symbols loaded.
'ConsoleApplication_empty_cpp.exe' (Win32): Loaded 'C:\PROGRA~2\Sophos\SOPHOS~1\SOPHOS~1.DLL'. Cannot find or open the PDB file.
'ConsoleApplication_empty_cpp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\psapi.dll'. Symbols loaded.
'ConsoleApplication_empty_cpp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\uxtheme.dll'. Symbols loaded.
'ConsoleApplication_empty_cpp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\dwmapi.dll'. Symbols loaded.
The program '[8348] ConsoleApplication_empty_cpp.exe' has exited with code -1073741502 (0xc0000142) 'DLL Initialization Failed'.  

 

0 Kudos