473,563 Members | 2,797 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

static and dynamic C runtime libraries?

Hi,

I have a C++ app which needs to work with a server on a remote machine. The
manufacturer has given us a set of DLL's which provide API calls to send
requests to the server and receive an information feed from it. My app is
compiled under Micro$oft VS.NET 2003 with option /MT to statically link in
the C runtime libraries msvcrt.lib etc. My app has to store information from
the server and answer requests from many remote clients. These requests are
made via an RPC connection.

It works like a charm on the test machine which is a replica of the
production machine. Both are dual processors and all the relevant DLL
versions are the same. I've checked them one by one.
Yet it falls over like a drunken sailor in production with a "Buffer
overrun" exception. I'm thinking that a mismatch between the static and
dynamic libraries might cause this, but why does it work perfectly in test
and not at all in production? There is a production feed from the server to
the test machine and it gets a similar stream of client requests generated
by another program which is running on several machines. The stress on the
test machine is the same, if not more than the production machine.

Free disk space on the prod machine is 1.5GB. There is 27GB free on the test
machine (!), Every time the info feed from the server indicates that
something significant has changed, it must be written to disk.

I realise that this is not much to work with, but does anyone have any ideas
as to why this app would run nicely in test and not in prod when the
environments and transaction volumes are virtually identical?

Regards, JohnD.
Jul 23 '05 #1
1 2521
On Sat, 18 Jun 2005 15:13:48 GMT, "John S Dalzell"
<jo*********@bi gpond.com> wrote in comp.lang.c++:
Hi,

I have a C++ app which needs to work with a server on a remote machine. The
manufacturer has given us a set of DLL's which provide API calls to send
requests to the server and receive an information feed from it. My app is
compiled under Micro$oft VS.NET 2003 with option /MT to statically link in
the C runtime libraries msvcrt.lib etc. My app has to store information from
the server and answer requests from many remote clients. These requests are
made via an RPC connection.

It works like a charm on the test machine which is a replica of the
production machine. Both are dual processors and all the relevant DLL
versions are the same. I've checked them one by one.
Yet it falls over like a drunken sailor in production with a "Buffer
overrun" exception. I'm thinking that a mismatch between the static and
dynamic libraries might cause this, but why does it work perfectly in test
and not at all in production? There is a production feed from the server to
the test machine and it gets a similar stream of client requests generated
by another program which is running on several machines. The stress on the
test machine is the same, if not more than the production machine.

Free disk space on the prod machine is 1.5GB. There is 27GB free on the test
machine (!), Every time the info feed from the server indicates that
something significant has changed, it must be written to disk.

I realise that this is not much to work with, but does anyone have any ideas
as to why this app would run nicely in test and not in prod when the
environments and transaction volumes are virtually identical?

Regards, JohnD.


You need to take this question to a Windows programming group, like
news:comp.os.ms-windows.program mer.win32 or one of Microsoft's support
groups in the news:microsoft. public.* family. The C++ language does
not define or support DLLs, static libraries, or remote calls across a
network, making it off-topic here. Your issue is all about Windows
specific mechanisms, not about the C++ language.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.l earn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html
Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
320
by: rahul | last post by:
Hi, I am working on developing a C++ application and caught with a strange issue: I am having 4 dynamic libraries for e.g. a.dll, b.dll, c.dll and d.dll. Each of these is linked with a static library called msg.lib. Now in all but one (d.dll) dynamic libraries there is a function called "LOGTOFILE". In d.dll this function is replaced...
3
3820
by: iceColdFire | last post by:
Hi, Can someone highlight the difference between static library and bynamic library...and how do .lib and .dll files come up in the picture... Thanks, a.a.cpp++ :-)
4
4781
by: jrefactors | last post by:
I want to distinguish between static SQL, dynamic SQL, and embedded SQL, but couldn't find too much useful resources in the web. For example, if we put SQL statements (SELECT, INSERT, UPDATE, etc...) inside an application (e.g. Java application, VB application, etc...), do we consider those SQL statements as static SQL? or embedded SQL? ...
6
2585
by: Andrew S. Giles | last post by:
Is it possible to bring in a static library (developed in C++) into a C# project/solution? Thanks in advance for any information. Andrew S. GIles
44
2821
by: John A. Bailo | last post by:
Dr. Dobbs has a /glowing/ article on Ruby on Rails this month. What do you guys think? Can it replace .net, php and java? And be the Open Source OOP web solution that is not bound to Sun or MS? http://media.rubyonrails.org/presentations/pursuitofbeauty.pdf
24
19045
by: Ken | last post by:
In C programming, I want to know in what situations we should use static memory allocation instead of dynamic memory allocation. My understanding is that static memory allocation like using array is faster than malloc, but dynamic memory allocation is more flexible. Please comment... thanks.
20
6074
by: JohnQ | last post by:
The way I understand the startup of a C++ program is: A.) The stuff that happens before the entry point. B.) The stuff that happens between the entry point and the calling of main(). C.) main(). So, if the above is OK, does static initialization occur during A or B? What happens during A?
6
5602
by: Even | last post by:
Hi all, As far as I know, relative address will be assigned by program at link time.Right? Ok, here we go. So if we use a static library, it will give the program an relative address(i mean the function address) at link time. Also the code of the library will load into the program. Go on. Now if we use a dynamic library, what it will...
20
4275
by: Nickolai Leschov | last post by:
Hello all, I am programming an embedded controller that has a 'C' library for using its system functions (I/O, timers, all the specific devices). The supplied library has .LIB and .H files. How can I dynamically load a LIB file and access all its functions? Surely someone has solved similar task? My intention is to use a Forth system...
0
7888
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7642
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7950
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6255
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5484
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3643
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1200
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
924
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.