|
|
Home » Community » Newbie corner » where can I find more info?
where can I find more info? [message #28584] |
Wed, 08 September 2010 07:06  |
jerson
Messages: 202 Registered: June 2010 Location: Bombay, India
|
Experienced Member |

|
|
I am looking at the Format function which is in util.cpp
This and few other functions have no mention anywhere in the documentation. Is there a place where all the available functions are listed and their parentage? This will help to know which files need to be included for a particular function to be used.
I have a file that uses the Format("%s","This is a test") function. Without the #include <core/core.h> I get a link time error on Format being undefined. On including <core/core.h> in my cpp file, I get
In file included from C:\MyApps\NIDAQ\NIDAQ.c:2:0:
C:\upp2625\uppsrc/core/core.h:39:20: fatal error: typeinfo: No such file or directory
compilation terminated.
and this is in Nidaq.c
#include "nidaqmx.h"
#include "core/core.h"
/**********************************************************************/
#define DAQmxErrChk(functionCall) if( DAQmxFailed(error=(functionCall)) ) goto Error; else
void MyTest()
{
return;
}
int32 Ni_ReadDI(int8 Dev, int8 Port, int32 *DI)
{
int32 error=0;
TaskHandle taskHandle=0;
uInt32 data;
char errBuff[2048]={'\0'};
int32 read;
//*********************************************
// DAQmx Configure Code
//*********************************************
DAQmxErrChk (DAQmxCreateTask("",&taskHandle));
DAQmxErrChk (DAQmxCreateDIChan(taskHandle,
(const char *)(Format("Dev%c/port%c",Dev,Port)),
"",DAQmx_Val_ChanForAllLines));
...... irrelevant part snipped off
I'd appreciate any help I can get with this. For now, I'm stuck.
Regards
-
Attachment: NIDAQ.zip
(Size: 150.13KB, Downloaded 243 times)
|
|
|
|
|
|
|
Re: where can I find more info? [message #28614 is a reply to message #28610] |
Wed, 08 September 2010 10:59   |
 |
koldo
Messages: 3432 Registered: August 2008
|
Senior Veteran |
|
|
jerson wrote on Wed, 08 September 2010 10:53 | Actually I did not forget the namespace Upp, I had to keep it out for the files to compile, otherwise, the Nidaqmx.h and this one were fighting it out in real-time on my desktop 
the extern "C" was needed to keep the linker happy or it could not 'see' the functions in the other file. Anyway, now that I have something working, I'll 'try' to move on. Thanks again.
|
Hello Jerson
As NIDAQmx.h redefines int32, ..., I have included this before:
#define _NI_int8_DEFINED_
#define _NI_int16_DEFINED_
#define _NI_int32_DEFINED_ This way, it does not disturb.
And remember that the namespace Upp is a must .
Best regards
Iñaki
|
|
|
|
|
Re: where can I find more info? [message #28633 is a reply to message #28630] |
Wed, 08 September 2010 16:30   |
|
Hi Jerson,
I guess your linker can't find the libs because they are in directory that is not specified on the linker command line. I believe you can solve it by adding "New linker option" in Package manager that specifies the path. For gcc it would be "-L/path/to/the/libs", not sure about the MSVC syntax from the top of my head. If I am not mistaken, then relative path might work as well.
The include paths are actually something bit different, as they are used only during compiling to find #include files.
Honza
|
|
|
Re: where can I find more info? [message #28634 is a reply to message #28584] |
Wed, 08 September 2010 17:30   |
jerson
Messages: 202 Registered: June 2010 Location: Bombay, India
|
Experienced Member |

|
|
Koldo, Honza
Perfect. I used the Setup->Build methods to inform the linker about LIB directories and it works.
Thank you for your help
Where can I find info about the various goodies hidden inside the Upp namespace? This will be very helpful as I'm quite unaware of the hidden jewels in the framework.
Quote: | I am looking at the Format function which is in util.cpp
This and few other functions have no mention anywhere in the documentation. Is there a place where all the available functions are listed and their parentage?
|
Is there some kind of a function browser that can be handy? Is ^N the answer?
Regards
[Updated on: Wed, 08 September 2010 17:34] Report message to a moderator
|
|
|
Re: where can I find more info? [message #28636 is a reply to message #28634] |
Wed, 08 September 2010 18:27   |
|
jerson wrote on Wed, 08 September 2010 17:30 | Is there some kind of a function browser that can be handy? Is ^N the answer?
|
Ctrl+N, Ctrl+J and last, but not least F1
Ctrl+N is good if you are interested in stuff from a distinct location (file or class).
Ctrl+J shows you everything (in currently included packages) and tells you where it is if you know how is it named.
F1 gives you details, at least for things that are documented.
Also Ctrl+G, but that is just Ctrl+J restricted to single file.
Honza
|
|
|
|
Goto Forum:
Current Time: Sun Apr 27 00:15:42 CEST 2025
Total time taken to generate the page: 0.03048 seconds
|
|
|