LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 05-09-2005, 09:17 AM   #1
gogettergary
LQ Newbie
 
Registered: May 2005
Posts: 4

Rep: Reputation: 0
compiling FPGA chip design software designed for windows (visual c++) in linux


hi all
we are a team of two final yr engg. students, nit jaipur, working on porting the router module of the GOSPL (generalized open sourcr programming logic) EDA chip design software designed for windows in VISUAL C++ to LINUX platform.

we have compiled the main program through command line using gcc compiler and it is giving the following errors:

1. ERRONOUS CODE: m_pStorageHeader=(CStorageHeader*)(m_pDataFile->getBaseAddress());m_pStorageHeader=(CStorageHeader*)(m_pDataFile->getBaseAddress());

ERROR: /usr/include/IDB/ICHOROUS/include/VMM/StorageManager/CMetaInfoReader.h: In
member function `void CMetaInfoReader<super>::MyService()':
/usr/include/IDB/ICHOROUS/include/VMM/StorageManager/CMetaInfoReader.h:11: parse
error before `;' token

2. THE FILE "WINDOWS.H" has been used in one program and a variable of datatype HANDLE has been defined. so the error is:
/usr/include/IDB/ICHOROUS/include/VMM/OSInteractor/CFile.h:17: 'HANDLE' is used
as a type, but is not defined as a type.

we are unable to find the definition of handle in windows.h. can sombdy tell a replacement for windows.h.....or can we export it to linux?? ...how???

3. CODE: template <class DataType> void* allocatespace (size_t sz,CPersists * check)
{
void* p= findStorage()->malloc(sz,(DataType::self_class).getCid());
setSize(p,sz);
return p;
}

ERROR: /usr/include/IDB/ICHOROUS/include/VMM/Stl/allocator.h:41: declaration of `class
DataType'

4. CODE: persistentvector(_It F,_It L):vector< _Ty, _A >(F, L) {
}
ERROR: /usr/include/IDB/ICHOROUS/include/VMM/Stl/persistentvector.h:52: parse error
before `F'

5. also the file #include <xtree> is not present in linux...any replaccement??

6. CODE : ~persistentvector(){
//~vector()
}
ERROR: /usr/include/IDB/ICHOROUS/include/VMM/Stl/persistentvector.h:55: ISO C++
forbids defining types within return type
/usr/include/IDB/ICHOROUS/include/VMM/Stl/persistentvector.h:55: destructors
must be member functions
/usr/include/IDB/ICHOROUS/include/VMM/Stl/persistentvector.h:55: return type
specification for destructor invalid
/usr/include/IDB/ICHOROUS/include/VMM/Stl/persistentvector.h:55: default
template arguments may not be used in function templates
/usr/include/IDB/ICHOROUS/include/VMM/Stl/persistentvector.h:55: declaration of
template `template<class _Ty, class _A> void persistentvector()'

7. CODE: _Destroy(_S, _Last);
ERROR: /usr/include/IDB/ICHOROUS/include/VMM/Stl/persistentvector.h:69: `_S' was not
declared in this scope
/usr/include/IDB/ICHOROUS/include/VMM/Stl/persistentvector.h:69: `_Last' was
not declared in this scope
/usr/include/IDB/ICHOROUS/include/VMM/Stl/persistentvector.h:69: initializer
list being treated as compound expression

WHAT DO WE MEAN BY SCOPE HERE???

these are some errors which come when we compile the main program of this module on command line.

ALSO WE WANT TO KNOW WHETHER USING THE CMD LINE IS THE RIGHT APPROACH OR SHUD WE USE KDEVELOP OR WINE OR SUMTHG LIKE THT ...N HOW??



will be really grateful if someone replies...

in a fix..
garima
pooja
 
Old 05-09-2005, 09:45 AM   #2
Marius2
Member
 
Registered: Jan 2004
Location: Munich
Distribution: SuSE 9.2, 10.2, 10.3, knoppix
Posts: 274

Rep: Reputation: 30
From winnt.h: typedef void *HANDLE;

No you can't port windows.h to *NIX. I think a good approach to solving this would be to throw out all windows specific dependencies, then walk along the errors gcc/make throws. If you come across a MS specific function, you could start by asking google about <name_of_windows_function> linux. It will save you time and redundant work if you collect all these functions in an extra module, which could look like this
(example for win32 timeGetTime() function)

unsigned long _mmtime(){
unsigned long result=0;
#ifdef _WIN32
result=timeGetTime();
#endif
#ifdef __linux__
timeval gtod_now_time;
gettimeofday(&gtod_now_time,0);
result=(gtod_now_time.tv_usec-gtod_start_time.tv_usec)/1000;
result+=(gtod_now_time.tv_sec-gtod_start_time.tv_sec)*1000;
#endif
return result;
}

Hint 2: Most of the MS types like hWnd, hInstance, etc. are nothing but an

-> int <-

HTH
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiling Linux software under Windows - your advice? midiox Programming 6 10-20-2005 08:49 AM
software for running games designed for windows rosslaird Linux - Software 5 09-11-2004 10:53 PM
Linux and Graphic design... software ? Qucho Linux - Software 7 05-01-2004 01:11 AM
I want to run a program designed for windows on Linux Mandrake. serkanyavas Linux - Laptop and Netbook 2 10-06-2003 10:16 PM
Visual DB schema's design - by what? Bogdan Linux - General 0 01-30-2003 03:03 PM


All times are GMT -5. The time now is 10:14 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration