Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
S

Shy Agam

@Shy Agam
About
Posts
234
Topics
75
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Server validator function fires even if not created (LOST ???)
    S Shy Agam

    Hey experts, I've got a CustomValidator wrapped inside a repeater, which is wrapped inside an if condition. When the condition is not met the code is not generated (I verified it using the browser's view source screen). However, the server function which validates the TextBox fires anyway, and it shouldn't. I realize that the following is a very simplified code, but I figure there's a concept I'm not aware of. Please advice... :confused:

    <% if (...)
    {
    %>
    <% } %>

    ASP.NET sysadmin question

  • Multiple includes
    S Shy Agam

    I understand... Thank you Paul, and everyone else for your help and opinions. :) For now, I shell continue and educate myself on the matter... Will "meet" again... (Soon I might add... ;P )

    C / C++ / MFC help question c++ visual-studio linux

  • Multiple includes
    S Shy Agam

    This is all a bit overwhelming for me... I also read some articles regarding the subject, but I still can't <b><i>completely</i></b> get my head around it. I should hit the books for a while and establish a more solid understanding of C++'s principles and design issues. For now, I would add this question though... What is the "danger" in what I did? i.e. declaring a private static member variable inside a class...

    C / C++ / MFC help question c++ visual-studio linux

  • Multiple includes
    S Shy Agam

    It appears I had to declare the static member variables in both the header files, and the source files. The project now compiles successfully. What's the idea behind this repetitive declaration? It's not like a function which is declared in the header, and defined in the source. It's simply a variable... Oo *Confused*

    C / C++ / MFC help question c++ visual-studio linux

  • Multiple includes
    S Shy Agam

    It appears you guys were right. This is a linker issue. Eclipse lets you specify a reference to your other project. Being a devoted Visual Studio for .NET developer, I guess I assumed adding the reference was suffice. However, I've found the specific settings needed for linking the library. For future references to this post: 1. Open the project's settings. 2. Expand "C/C++ Build" and select "Settings". 3. Under "Tool Settings" expand "GCC C++ Linker" and select "Libraries". 4. Add the name of the library on the top box, and the path to its files on the bottom one. (Note that the path to the library should be the project's Debug directory) So now the project gets compiled, and the linker no longer whines about not finding the library. However I get some new linking errors. The new console output is as follows: make all Building target: Maple Invoking: GCC C++ Linker g++ -L"/LibraryPath/Debug" -o"Maple" ./Source/Maple.o -lCursesPlus /LibraryPath/Debug/libCursesPlus.so: undefined reference to `CursesPlus::CursesPlusEngine::initialized' . . . collect2: ld returned 1 exit status make: *** [Maple] Error 1 The vertical three dots hold place for a series of "undefined reference to..." errors, which are similar to the first error, but specify a different member of CursesPlusEngine. And to make it clear: Maple is my main executable project, and libCursesPlus is my library project. --Edit-- All of the above members are defined as private static in their corresponding header files.

    modified on Tuesday, August 31, 2010 4:56 AM

    C / C++ / MFC help question c++ visual-studio linux

  • Multiple includes
    S Shy Agam

    Richard MacCutchan wrote:

    Is GetInstance() a static member with public visibility?

    Yes.

    C / C++ / MFC help question c++ visual-studio linux

  • Multiple includes
    S Shy Agam

    #include <HeaderFileFromLibrary.h>

    using namespace NamespaceFromHeaderFile;

    int main(int argc, char **args)
    {
    ClassFromHeaderFile *pClass = ClassFromHeaderFile::GetInstance();

    .
    .
    .
    
    return 0;
    

    }

    The first row in main throws the following compile error: undefined reference to `NamespaceFromHeaderFile::ClassFromHeaderFile::GetInstance()'

    Cedric Moonen wrote:

    Are you sure you linked correctly to the library ?

    AAMOF I'm not experienced with C++ coding. As I am an experienced developer in other languages, I can write proper code (Or so I would like to think ;) ), but I don't have the experience for configuring my projects properly. As far as I can tell I did link the library correctly. Any way to make sure of it?

    modified on Monday, August 30, 2010 7:40 AM

    C / C++ / MFC help question c++ visual-studio linux

  • Multiple includes
    S Shy Agam

    Indeed. However, I neglected to mention that the headers and their .cpps are in one shared-library project, and there's another project using this library. The other project is the one which fails to compile. It seems that this is some kind of linkage problem of some sort, but I can't figure it out. I copied the main file form my executable project into the library project, just to see if it compiles, and it compiled perfectly. Might I be missing on a specific linkage configuration?

    C / C++ / MFC help question c++ visual-studio linux

  • Multiple includes
    S Shy Agam

    Hello experts, I recently solved my duplicate includes problem using the #ifndef-#define-#endif pre-processors. However, this somehow causes a problem if classes from the same .h file should be used by different .cpp files. The first .cpp file including the .h file gets compiled, but the others throw an "undefined reference" compile error. It's as if I never included the .h file on the other files. How can I overcome both duplicate includes and single includes problems? A bit on my workstation: OS: Ubuntu. IDE: Eclipse. Compiler: g++ Thanks in advance, Shy.

    C / C++ / MFC help question c++ visual-studio linux

  • Disposing of object used in a UserControl...
    S Shy Agam

    Hello experts, I'm currently developing a UserControl in which I have a browseable Image property. What is the correct approach to dispose this image? Should my UserControl dispose of it when it gets disposed? That would create a potential problem if the Image is used elsewhere around the application. But then again, not doing so means taking the chance that the image is not disposed. Thanks in advance, Shy.

    C# question help

  • Creating API for my application...
    S Shy Agam

    Hello experts, Developers sometimes provide ways for other programmers to interact with their application using API they've created. Those API somehow "talk" with the original application they belong to. So if application A was written by someone, application B (which was written by someone else) can do this "talking" with A using A's APIs. I see no problem in developing a DLL which exposes functions. But how do I go about making my DLL able to talk with my app when used by another external application? Thanks in advance, Shy.

    C / C++ / MFC question json help

  • Interprocess Communication problems
    S Shy Agam

    I would suggest a different approach, as it is obvious that TCP channels are wasteful when the two applications run on the same machine. There's an article I wrote which explains how to do IPC in C#. It's not the main purpose of the article, but you can use it to get ideas... It's called A Pure .NET Single Instancing Solution[^] Good luck... Shy.

    C# help question

  • Question about how Sockets work
    S Shy Agam

    For your first question... Yes... It's the same socket... As for the second question, I'm not sure I understand... But if I do, than you should do the following in the callback function you used when calling BeginReceive(): private void ReceiveCallback(IAsyncState state) { . . . int receivedBytes = yoursocket.EndReceive(...); if (receivedBytes <= 0) { // Other side closed the connection... // Do as you wish... } else { // Analyze the received data } . . . } I wrote it the way I remember... So it may not be 100% accurate, but this is the main idea. Good luck, Shy

    C# question

  • Non-GUI Application with small memory consumption...
    S Shy Agam

    I read the article... Thanks...

    C / C++ / MFC c++ json performance question

  • Non-GUI Application with small memory consumption...
    S Shy Agam

    It doesn't matter... I was put on certain constraints... I have to enforce them... Maybe I can remove dependencies from my app...(?) According to previous posts, it should affact the MemUsage column...

    C / C++ / MFC c++ json performance question

  • Non-GUI Application with small memory consumption...
    S Shy Agam

    Moak wrote:

    Who is repsonsible for those requirements, would he consider using a root kit that hides the presence of the process from the task manager? Just kidding...

    Hehe... That was funny... :) There's an existing app which consumes about 300k. It's basically the same as the one I'm supposed to write, but it lacks some basic must-have features/abilities, and needs some improvements... The goal is to keep this kind of memory usage, but improve the app, in order not to "pay a large price" for the improvements...

    C / C++ / MFC c++ json performance question

  • Non-GUI Application with small memory consumption...
    S Shy Agam

    6.0

    C / C++ / MFC c++ json performance question

  • Non-GUI Application with small memory consumption...
    S Shy Agam

    My goal is to make the Mem Usage column display 320k or less...

    C / C++ / MFC c++ json performance question

  • Non-GUI Application with small memory consumption...
    S Shy Agam

    rp_suman wrote:

    In generated code, check which part displays console.

    What do you mean by "In generated code"? Nothing was auto-generated...

    rp_suman wrote:

    Is "windows.h" the only header included or something else?

    Yes, it's the only header included. However, when I included it and linked the project, basetsd.h was automatically added to the project as an external dependency.

    C / C++ / MFC c++ json performance question

  • Non-GUI Application with small memory consumption...
    S Shy Agam

    Using the "Processes" tab in the Task Manager...

    C / C++ / MFC c++ json performance question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups