dbTalk Databases Forums  

Linking problems with VS compiler and ESQLC code

comp.databases.ingres comp.databases.ingres


Discuss Linking problems with VS compiler and ESQLC code in the comp.databases.ingres forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Colin Hay
 
Posts: n/a

Default Linking problems with VS compiler and ESQLC code - 06-14-2009 , 08:04 AM






My ESQLC program that I've been working on for a while builds fine using the
VS 2008 compiler using a makefile

After adding an Ingres routine to convert decimals to strings in C and
adding all the various include files that were also required
I was getting compile errors caused clashes with 3 functions - atoi(),
calloc() and free()
I was getting 'errors in stdlib.h - error C2375 - redefinition; different
linkage' errors

The Dec2Str routine includes stdlib.h which seems to be causing these
problems

I copied the prototypes definitions from stdlib.h (the Visual Studio C++
file) and pasted them into my .sc code thus:

_CRTIMP _CRTNOALIAS void __cdecl free(_Inout_opt_ void * _Memory);
_Check_return_ _CRTIMP _CRT_JIT_INTRINSIC int __cdecl atoi(_In_z_ const
char *_Str);
_Check_return_ _Ret_opt_bytecap_x_(_NumOfElements* _SizeOfElements) _CRTIMP
_CRT_JIT_INTRINSIC _CRTNOALIAS _CRTRESTRICT void * __cdecl calloc(_In_
size_t _NumOfElements, _In_ size_t _SizeOfElements);

This fixed the compile errors but then naturally enough I get unresolved
symbols:

_CM_AttrTab
_cmu_getutf8property
_CM_UTF8Bytes
_CM_isUTF8

caused by these declarations. What this the right thing to do ? Isn't UTF
Unicode - what is it trying to do ?!?

I also tried with Visual Studio 6 - in case VS 2008 was breaking Ingres
somewhere with the following declarations

_CRTIMP void __cdecl free(void *);
_CRTIMP int __cdecl atoi(const char *);
_CRTIMP void * __cdecl calloc(size_t, size_t);

Same problems ....

What do I need to get it all to compile and link ?

Reply With Quote
  #2  
Old   
Roy Hann
 
Posts: n/a

Default Re: [Info-Ingres] Report writer - csv with brackets around negative values... - 06-23-2009 , 03:56 AM






Andrew wrote:

Quote:
Hi All,

I am trying to create a csv file using Report Writer and hopefully when
opened in Excel will display negative values inside round brackets.

Has anyone been successful in doing this? Any help would be greatly
appreciated.

I have tried opening my csv file in Excel 2003 and 2007 and the best I
get, so far, is a negative value in red - no brackets...

I have a feeling its more an Excel issue but someone might know the
formula required.
I think your feeling is correct. I think you need to use a custom
format, which would have to be done manually in Excel.

[snip]

Quote:
Double clicking on the file in windows starts excel and loads the file
but the brackets are not displayed...
--
Roy

UK Ingres User Association Conference 2010 will be on Tuesday June 8 2010
Go to http://www.iua.org.uk/join to get on the mailing list.

Reply With Quote
  #3  
Old   
James K. Lowden
 
Posts: n/a

Default Re: [Info-Ingres] Report writer - csv with brackets around negativevalues... - 06-25-2009 , 10:45 PM



Roy Hann wrote:
Quote:
I have a feeling its more an Excel issue but someone might know the
formula required.

I think your feeling is correct. I think you need to use a custom
format, which would have to be done manually in Excel.
Another option: Keep a spreadsheet all nicely formatted with formula
references to another file: your csv file. With a little cleverness,
maybe a macro, the data filename can be dynamic, if that matters.

HTH.

--jkl

Reply With Quote
  #4  
Old   
Andrew
 
Posts: n/a

Default Re: [Info-Ingres] Report writer - csv with brackets around negativevalues... - 06-29-2009 , 11:29 PM



I tried many things and appreciated all the suggestions.

But due to the various requirements I will have to look into generating
an ascii style of file for Excel - file extension .slk (SYLK files)

Hopefully I will be able to achieve what I need with this...

Regards,
Andrew.

James K. Lowden wrote:
Quote:
Roy Hann wrote:

I have a feeling its more an Excel issue but someone might know the
formula required.

I think your feeling is correct. I think you need to use a custom
format, which would have to be done manually in Excel.


Another option: Keep a spreadsheet all nicely formatted with formula
references to another file: your csv file. With a little cleverness,
maybe a macro, the data filename can be dynamic, if that matters.

HTH.

--jkl

_______________________________________________
Info-Ingres mailing list
Info-Ingres (AT) kettleriverconsulting (DOT) com
http://www.kettleriverconsulting.com...fo/info-ingres



Reply With Quote
  #5  
Old   
Richard Harden
 
Posts: n/a

Default Re: [Info-Ingres] Report writer - csv with brackets around negativevalues... - 06-30-2009 , 04:44 AM



Hi Andrew,



I Have just played around with a csv file with various rows in it, opening
it with excel 2007



CSV File Contents

"String Value","Number"

"One",1

"Two",2

"Minus 1",-1

"Minus 2",(2)

"last Line",9999



Excel Results


String Value

Number


One

1


Two

2


Minus 1

-1


Minus 2

-2


last Line

9999





Whilst excel seems to understand the brackets, it still displays the numbers
in the general format



Perhaps the best option is to use a macro on open to import the csv file and
apply the "#,##0;(#,##0)" formatting to the number columns that you want
displayed with () around the negative numbers



The other option I tried was to create a spreadsheet in the required format
with column headers etc, then formatted the number columns using
"#,##0;(#,##0)", then on the first row and column

Below the header I imported external data (after going through the basic
import questions (delimiters, text/general etc) I got the data in and the
result seems to be what you are after

(for this test I did remove the column headers from the csv file.






String Values

Numbers



Positive 1

1



Positive 2

2



Negative 1

(1)



Negative 2

(2)



Last Line

999





So it will probably be possible to create a macro that on opening the
spreadsheet it automatically imports the csv file.





Hope this helps



Dic Harden.





-----Original Message-----
From: info-ingres-bounces (AT) kettleriver...ting (DOT) com
[mailto:info-ingres-bounces (AT) kettleriverconsulting (DOT) com] On Behalf Of Andrew
Sent: Tuesday, 30 June 2009 4:29 p.m.
To: Ingres and related product discussion forum
Subject: Re: [Info-Ingres] Report writer - csv with brackets around negative
values...



I tried many things and appreciated all the suggestions.



But due to the various requirements I will have to look into generating

an ascii style of file for Excel - file extension .slk (SYLK files)



Hopefully I will be able to achieve what I need with this...



Regards,

Andrew.



James K. Lowden wrote:

Quote:
Roy Hann wrote:



I have a feeling its more an Excel issue but someone might know the

formula required.



I think your feeling is correct. I think you need to use a custom

format, which would have to be done manually in Excel.





Another option: Keep a spreadsheet all nicely formatted with formula

references to another file: your csv file. With a little cleverness,

maybe a macro, the data filename can be dynamic, if that matters.



HTH.



--jkl



_______________________________________________

Info-Ingres mailing list

Info-Ingres (AT) kettleriverconsulting (DOT) com

http://www.kettleriverconsulting.com...fo/info-ingres








_______________________________________________

Info-Ingres mailing list

Info-Ingres (AT) kettleriverconsulting (DOT) com

http://www.kettleriverconsulting.com...fo/info-ingres

Reply With Quote
Reply




Thread Tools
Display Modes

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

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



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.