|
hi,
Check this[^]
Bye,
Cool Ju
Dream Ur Destiny
|
|
|
|
|
Hi guys
This is probably an easy question for all you C++ experts, but C++ is not my native tongue so maybe you all could help me.
I'm trying to port a Visual C++ 6 codebase to Visual Studio 2003. In several of the header files, it's asking for native.h
#include <native.h>
For some reason VS2003 as well as VS2005 both don't know where this native.h file is, I'm getting the compiler error
"theFile.cpp(3): fatal error C1083: Cannot open include file: 'native.h': No such file or directory"
Searching my disk, native.h doesn't exist. Where is it? Do I need it? (removing the native.h import results in hundreds of compiler errors)
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Connor's Christmas Spectacular!
Judah Himango
-- modified at 23:15 Tuesday 28th February, 2006
|
|
|
|
|
Judah Himango wrote: #import <native.h>
Shouldn't this be
#include "native.h"
Nibu thomas
Software Developer
|
|
|
|
|
I'm sorry, typo. The actual code is
#include <native.h>
|
|
|
|
|
So where do you have this native.h . Is it inside the project directory.
Nibu thomas
Software Developer
|
|
|
|
|
No. It does not exist on my system, nor was it included with the VC6 source I have been given. After doing some searching on the web, it appears it was included as part of the install with Visual C 6, yet is mysteriously absent from VS2003 and VS2005.
|
|
|
|
|
Just comment out that line and see what errors come up. Just to find out the declarations that require native.h
Nibu thomas
Software Developer
|
|
|
|
|
As I mentioned in my first post, removing the lines asking for native.h results in several hundred compiler errors. 
|
|
|
|
|
Judah Himango wrote: in several hundred compiler errors.
Can I see some of the errors...
Nibu thomas
Software Developer
|
|
|
|
|
oneOfMyFiles.h(38): error C2146: syntax error : missing ';' before identifier 'MSReserved'
oneOfMyFiles.h(104): error C2146: syntax error : missing ';' before identifier 'MSReserved'
oneOfMyFiles.h(143): error C2146: syntax error : missing ';' before identifier 'videoStartTime'
oneOfMyFiles.h(143): error C2501: 'Classg3dmedia_video_VideoExport::int64_t' : missing storage-class or type specifiers
oneOfMyFiles.H: error C2501: 'Classg3dmedia_video_VideoExport::videoStartTime' : missing storage-class or type specifiers
The code itself interops with some old Java RNI stuff, so I'm wondering if its a lost cause to port it to VS2003 or later.
By the way, can one download Visual C++ 6 from an MSDN subscription? I don't see VC6 listed, yet I see VS2002, 2003, 2005, VC 4.1, and others...
-- modified at 23:49 Tuesday 28th February, 2006
|
|
|
|
|
Judah Himango wrote: The code itself interops with some old Java RNI stuff, so I'm wondering if its a lost cause to port it to VS2003 or later.
Native.h is one of the header files from the Microsoft SDK for Java.
I got the above sentence from here[^]
Nibu thomas
Software Developer
|
|
|
|
|
Ugh. Any idea where I can get the Microsoft SDK for Java?
Also, do you know if I can get Visual C++ 6 from an MSDN subscription?
|
|
|
|
|
Judah Himango wrote: Also, do you know if I can get Visual C++ 6 from an MSDN subscription?
Not sure about this.
Judah Himango wrote: Ugh. Any idea where I can get the Microsoft SDK for Java?
Just a guess. Don't you have J#.
Nibu thomas
Software Developer
|
|
|
|
|
I'm not interested in J# for this; I'm just trying to get this Visual C 6 code to compile. I'm certain J# will not help here.
|
|
|
|
|
Judah Himango wrote: I'm certain J# will not help here
May be Installing J# can get you the native.h file that you need.
Nibu thomas
Software Developer
|
|
|
|
|
Thanks, but it's already installed and there's no native.h, unfortunately.
|
|
|
|
|
|
Right, I'm aware of the dropping of J++ in favor of all the .NET technologies. Just a PITA to have to compile old code dependent on this stuff.
|
|
|
|
|
I create 2 UDP sock ,
a server sock s:
a.sin_family=AF_INET;
a.sin_addr.s_addr=0;
a.sin_port=htons(5050);
bind(s,(sockaddr *)&a,sizeof(sockaddr_in));
a client sock c:
addrto.sin_family=AF_INET;
addrto.sin_addr.s_addr=INADDR_BROADCAST;
addrto.sin_port=htons(5050);
int ret=sendto(s,smsg,256,0,(sockaddr*)&addrto,nlen);
but I can set any address and port that is pass to recvfrom () and recvfrom can receive data from client.;
so recvfrom do not use the parameter address and port ?
see below:
from.sin_family=AF_INET;
from.sin_addr.s_addr=inet_addr("198.24.125.14")//any address;
from.sin_port=htons(5455)//any port;
recvfrom(s,buf,256,0,(struct sockaddr FAR *)&from,(int FAR *)&fromlength);
|
|
|
|
|
Hi,
I have a SDI application
When I click to run
I would like to know how to take parameters from command line running.
I mean I want to be able to run my application by DOS like this:
> MyApp -x -a
and get the parameters inside the application and pass it to SDI application.
Pls help me!
Many Thanks
-- modified at 21:40 Tuesday 28th February, 2006
|
|
|
|
|
you can use the function GetCommandLine() from any where in the application to get the command line parameters
nave
|
|
|
|
|
Another option is ParseCommandLine(...) which takes a CCommandLineInfo object as an argument.
For advanced parsing derive a class from CCommandLineInfo and override ParseParam to handle new flags.
Nibu thomas
Software Developer
|
|
|
|
|
is it possible to use server sock without any port appointed?
|
|
|
|
|
derek7 wrote: is it possible to use server sock without any port appointed?
Server listens for connections so hence it should be bound to a port.
Nibu thomas
Software Developer
|
|
|
|
|
Yes it is. If you call bind() with a port number of 0 (zero), the system will choose a port for you, and you can use getsockname() to find out which port it was bound to.
This is generally not very useful, because you still need to inform the client what the port number is somehow.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|