Results 1 to 6 of 6

Thread: Unexpected error occurred in code generator

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2011
    Posts
    6

    Unexpected error occurred in code generator

    Microsoft (R) Incremental Linker Version 6.00.8168
    Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

    LINK : fatal error LNK1104:
    cannot open file "C:\Documents and Settings\Igor\Meus documentos\Meus Softwares\VB\VB6\OCX\EasyComponents\EasyComponents.ocx"

    Any suggestions?

  2. #2
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: Unexpected error occurred in code generator

    Does the file exist? Is it being used by another application at the time?
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  3. #3

    Thread Starter
    New Member
    Join Date
    Mar 2011
    Posts
    6

    Re: Unexpected error occurred in code generator

    Yes, everything's all right. I've ever done this lots of times.
    Happens that, altough it compiles normally, it shows this message in the end.
    The worst is when I try to run the debug project to test my ocx.
    I get a "permission denied" message everytime.

    There's nothing unusual. I do these things since ever and then, I don't know why, neither microsoft does, apparently.

    I checked my folders configurations, and all of them are marked as read only, and I can't change it. Maybe that's the problem, anyway, I don't know what's really happening. I thought that if I got to fix the compiler problem that would be all right, but now I see that there's a lot more.

    Any ideas?

  4. #4
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: Unexpected error occurred in code generator

    Well, from my experiences... If I have other VB instances running that are using the ocx, when I tried to recompile the ocx (opened in another VB instance), I'll get an error like you mentioned. I simply have to close previous VB instances and try again. At times, I'll even get the same or similar error you get. When this happens, I simply save my changes to the ocx project, close it, re-open it and re-compile it. If that scenario is true for you too; may just have to simply live with it. VB doesn't necessarily release all references to objects it creates (i.e., ocx, dlls) immediately when you stop running a project. It may keep them around for a bit until its garbage collection releases it or you close your project. That's my guess as to why I get those errors.

    Bottom line suggestion: When you get that error, save your changes, close all instances of VB. Re-open your project and try re-compiling without making any further changes and hopefully the error is gone. Also, if you are using binary compatibility option, ensure the ocx you previously compiled is still there and not unregistered; otherwise, skip binary compatibility or reregister that previously compiled ocx.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  5. #5

    Thread Starter
    New Member
    Join Date
    Mar 2011
    Posts
    6

    Re: Unexpected error occurred in code generator

    It seems it was a firewall. And that read only stuff continues, but it didn't spoil my progress this time.
    Anyway thanks for attention.

  6. #6
    New Member
    Join Date
    Apr 2011
    Location
    LOS
    Posts
    4

    Re: Unexpected error occurred in code generator

    Quote Originally Posted by ingoaglreen View Post
    It seems it was a firewall. And that read only stuff continues, but it didn't spoil my progress this time.
    Anyway thanks for attention.
    the file is lost!!Reset up

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width